<template>
  <div class="">
    <button @click="back">返回</button>
    <h1>详情页</h1>
    <img :src="item.pic" alt="" />
    <h1>{{ item.title }}</h1>
  </div>
</template>

<script>
export default {
  data() {
    return {
      item: this.$route.query.item,
    };
  },
  mounted() {},
  methods: {
    back() {
      this.$router.back();
      this.$router.go(-1);
      //回到上一页
    },
  },
  components: {},
};
</script>

<style lang="scss"></style>
